//###############
// FILE : SelectOutputFileAction.java
// WRITER : Lior Zimmerman liorz06 066462300
// WRITER : Ohad Dan ohad_dan 036767960
// EXERCISE : oop ex3 2008
// DESCRIPTION:
// Responsible of selecting output file.
//###############
package oop.ex3.fileSearchController;

import java.io.IOException;

import oop.ex3.fileSearchView.GUIView;

public class SelectOutputFileAction extends Controller {
	/**
	 * Initializes a new output file selector.
	 * @param gui Main frame.
	 */
    public SelectOutputFileAction(GUIView gui) {
        super(gui);
    }
    /**
     * Enables selecting output file.
     */
    public void doAction(){
        String path =_gui.getSetupView().txtGetOutput();
        try{
            path = _gui.showSaveDialog();
        }
        catch (IOException e){
            _gui.setStatus(e.getMessage());
        }
        _gui.getSetupView().setTextOutputFile(path);
    }


}
